<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
</head>

<body>
  <div
    style="height:400px;width:550px;margin:50px auto;margin-left:auto;border:solid 1px;background: rgb(246, 246, 253);">
    <div style="margin-left: 35px;">
      # 首页test
      <form action="#" role="form" style="margin-top: 90px;margin-left: 60px;">
        # 欢迎进入首页！
        <div style="margin-top: 145px;">
          <input type="button" onClick="toLogin()" value="登 陆"/>
        </div>
      </form>
    </div>
  </div>
  <script>
    function toLogin() {
      console.log("toLogin");
      location.href = "/login";
    }
  </script>
</body>

</html>